/*
 * Copyright 2007 Pleso.net
 * 
 * Licensed under the GNU Lesser General Public License, Version 2.1 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.gnu.org/licenses/lgpl.html
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package net.pleso.framework.client.ui.controls.datagrid.interfaces;

import net.pleso.framework.client.ui.controls.datagrid.DataGrid;

/**
 * Interface of class that bind data to each item (header, row, etc.) of
 * {@link DataGrid}. Implementation of this interface is external for grid.
 * 
 * @author Scater
 * 
 */
public interface IDataBinder {

	/**
	 * Grid call this method when it wants to show cell in header In
	 * implementation of this method data binder could set text (or widget) in
	 * current header cell.
	 * 
	 * @param dataGridHeader header to bind
	 */
	void bindHeader(IDataGridHeader dataGridHeader);

	/**
	 * Grid call this method when it wants to show row with data In
	 * implementation of this method data binder could set text (or widget) in
	 * all cells of current data row.
	 * 
	 * @param dataGridRow row to bind
	 */
	void bindRow(IDataGridRow dataGridRow);

}
